package com.peko.controller;

import com.peko.openFeign.HystrixClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：Peko
 * @Description：TODO
 * @Date：Created in 12:09 2023/8/2
 */

@RestController
public class Controller {

    private static final Logger log = LoggerFactory.getLogger(Controller.class);

    @Autowired
    private HystrixClient hystrixClient;

    @GetMapping("test")
    public String test(){
        String demo = hystrixClient.demo(123);
        log.info("调用hystrixClient.demo：{}",demo);
        return "openFeignHystrix ok !";
    }
}
